package com.huawei.M01.iterator.M14;

public class Fruit {

    public void doSomeThing(String str) {
        System.out.println("fruit" + str);
    }

    public void doSomeThing(Object str) {
        System.out.println("fruit object" + str);
    }


}
class Apple extends Fruit {


    public void doSomeThing(String str) {
        System.out.println("apple" + str);
    }

    public static void main(String[] args) {
        Fruit fruit = new Apple();
        Object obj = "test";
        fruit.doSomeThing(obj);
        fruit.doSomeThing("sgh");
    }
}
